var database = require('../../../data/data.js')
Page({

  data: {

  },
  onLoad: function (options) {
    var that = this;
    if (database.login == false) {
      wx.redirectTo({
        url: '/pages/newBinding/newBinding',
      })
    } else {
      wx.getUserInfo({
        success: function (res) {
          that.setData({
            img_url: res.userInfo.avatarUrl,
            nickName: res.userInfo.nickName,
            tel: database.tel
          })
        }
      })
    }
  },
  password: function (e) {
    wx.navigateTo({
      url: '/pages/my/password/password',
    })
  }
})